import {
    getRouteAll,
    getRouteArr,
    updataRouteById,
    deleteRouteById,
    deleteRouteMoreById,
    SearchRouteKey,
    addRoute,
  } from "../../api/route.js";
  import { verifyToken } from "../../utils/TokenCheck.js";
  
  export default function routeRouter(router) {
    // 获取全部路由信息
    router.get("/getRouteAll", verifyToken, getRouteAll);
    // 分页查询路由信息
    router.post("/getRoutePage", verifyToken, getRouteArr);
    // 修改指定id路由信息
    router.post("/updataRouteById", verifyToken, updataRouteById);
    // 删除指定id路由信息
    router.delete("/deleteRouteById/:id", verifyToken, deleteRouteById);
    // 批量删除指定id路由信息
    router.post("/deleteRouteMoreById", verifyToken, deleteRouteMoreById);
    // 根据key-value分页查询指定路由信息
    router.post("/SearchRouteKey", verifyToken, SearchRouteKey);
    // 添加路由信息
    router.post("/addRoute", verifyToken, addRoute);
  }
  